<template>
  <div class="myrent-page">
    <van-nav-bar
    class="title"
      title="房屋管理"
      left-arrow
      fixed
      @click-left="$router.push('/my')"
    />
      <MyrentVue v-for="(item, index) in list" :key="index"
      :item ="item"
      ></MyrentVue>
  </div>
</template>

<script>
import { getMyrentlist } from '@/api/rent'
import MyrentVue from '@/components/MyrentVue'
export default {
  name: 'collect-page',
  components: {
    MyrentVue
  },
  data () {
    return {
      list: []
    }
  },
  async created () {
    const { body } = await getMyrentlist()
    console.log(body)
    this.list = body
  },
  methods: {
  }
}
</script>

<style lang="less" scoped>
.title {
  background-color:#1cb680;
  padding-right: 20px;
  text-align: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 46px;
}
::v-deep .van-icon, .van-icon-arrow-left, .van-nav-bar__arrow {
  color: #fff;
}
::v-deep .van-nav-bar__title, .van-ellipsis {
  color: #fff;
  font-size: 18px;
  text-align: center;
}
</style>
